<script>
if (timer!=null)
	clearInterval(timer);
var timer = setInterval("update_log()", 1000 * 10);

function update_log() {
<?php echo $js->request(array('controller'=>'private','action'=>'update_log'),array('update'=>'#logwindows'));?>
}

function stop_update()
{
	clearInterval(timer);
}
</script>
<div class="panel">
<div id="RTcommand" style="margin-left:10px;">
<?php
echo $form->create(NULL);
echo $form->input('RTcommandInput',array('div'=>false,'label'=>__('Console command :',true)));
echo $js->submit(__('Send',true),array('url'=>array('controller'=>'private','action'=>'commandRT'),'div'=>FALSE,'dataExpression'=>true,'update'=>'#commandresult','method'=>'post','data'=>'{data:$(\'#itemRTcommandInput\').val()}','class'=>'submit ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only'));
echo $form->end();
?>
<b><?php __('Experimental command, use at your own risk !');?></b>
</div>
<div id="commandresult" style="padding: 0px 10px; margin-bottom: 5px;">
</div>

<div style="overflow:auto" id="logwindows">
<?php
echo $this->element('logwindows');
?>
</div>
<br/>
<center>
<?php
echo $form->button('<span class="ui-button-text">'.__('Stop update',true).'</span>',array('onclick'=>'clearInterval(timer);alert(\'Update stopped!\')','div'=>false,'class'=>'submit ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only'));
?>
</center>
<?php echo $this->Js->writeBuffer(); ?>
</div>